

from flask_restx import Resource
from webargs.flaskparser import use_args
from webargs import fields

from resources.collection import  Collection

from models.clockins import Clockin
from schemas.clockins import ClockinSchema

co = Collection(Clockin,ClockinSchema)

args = {'name':fields.Str(),
        'status':fields.Str(),
        'time':fields.DateTime(),
        'timetable_id':fields.Int()
        }
class ClockinResource(Resource):

    @co.get
    def get(self,id):
        pass

    @use_args(args,location='json')
    @co.put
    def put(self,args,id):
        pass
    
    @co.delete
    def delete(self,id):
        pass

class ClockinsResource(Resource): 
    
    @use_args({'page':fields.Int(missing=1),'per_page':fields.Int(missing=20)},location='query')
    @co.multiget 
    def get(self,args):
        pass

